<?
$roles = $this->roles;
?>
<table class="table4admin">
    <thead>
    <tr>
        <th>Name</th>
        <th>Description</th>
        <th></th>
        <th></th>
    </tr>
    </thead>

    <tbody>
    <? foreach ($roles as $role): ?>
    <tr>
        <td><?= $role['name'] ?></td>
        <td><?= $role['description'] ?></td>

        <td><a href="/roles/edit/id/<?= $role['id'] ?>">Edit</a></td>
        <td>
            <?  if ($role['deletable']) : ?>
            <a href="/roles/delete/id/<?= $role['id'] ?>" class="delete">Delete</a>
            <? else: ?>
            Delete
            <? endif; ?>
        </td>
    </tr>
        <? endforeach; ?>
    </tbody>
</table>

<a href="/roles/add">Add role</a>